package com.bestvike.stone.core.collection;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by 许崇雷 on 2018-08-27.
 */
public final class SetUtils extends org.apache.commons.collections.SetUtils {
    public static <E> boolean isEmpty(Set<E> set) {
        return set == null || set.isEmpty();
    }

    public static <E> Set<E> singleton(E element) {
        Set<E> set = new HashSet<>(1);
        set.add(element);
        return set;
    }
}
